package day13;

import java.io.*;

//本类是用来测试字节输入流的演示demo
public class Testln {
    public static void main(String[] args) throws IOException {
//method();
        method1();
    }

    public static void method1() throws IOException {
        InputStream in = null;
        in = new BufferedInputStream(new FileInputStream("E:\\ready\\1.txt"));
        int b;
        while ((b = in.read()) != -1)
        {
            System.out.println(b);
        }
        in.close();
    }


    public static void method() throws IOException {
//        InputStream in =new InputStream() ;
//        InputStream in = new FileInputStream(new File("e:\\ready\\1.txt"));
        InputStream in = null;
        in = new FileInputStream("e:\\ready\\1.txt");
        System.out.println(in.read());
        int b;
        while ((b = in.read()) != -1) {
            System.out.println(b);
        }
        in.close();

    }
}